<template>
  <el-tabs type="border-card" @tab-click="handleClick">
    <el-tab-pane label="新档案分类查阅">
      <eng-sort v-if="activeName === 'engsort'"></eng-sort>
    </el-tab-pane>
    <el-tab-pane label="旧档案分类查阅">
      <volume-sort v-if="activeName === 'volumesort'"></volume-sort>
    </el-tab-pane>
  </el-tabs>
</template>

<script>
import engSort from "@/views/system/show/engsort.vue";
import volumeSort from "@/views/system/show/volumesort.vue";

export default {
  components: {
    engSort,
    volumeSort
  },
  data() {
    return {
      activeName: 'engsort',
    }
  },
  methods: {
    handleClick(tab) {
      if (tab.label === '新档案分类查阅') {
        this.activeName = 'engsort'
      } else if (tab.label === '旧档案分类查阅') {
        this.activeName = 'volumesort'
      }
    }
  }
}
</script>
